//
//  UIViewController+WHYExtension.m
//  News163
//
//  Created by 王洪运 on 16/1/8.
//  Copyright © 2016年 王洪运. All rights reserved.
//

#import "UIViewController+WHYExtension.h"

@implementation UIViewController (WHYExtension)

+(instancetype)viewControllerWithStoryboardName:(NSString *)storyboardName bundle:(NSBundle *)storyboardBundleOrNil identifier:(NSString *)identifier {
    
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle:storyboardBundleOrNil];

    UIViewController *viewController = nil;
    if (identifier) {
        viewController = [storyboard instantiateViewControllerWithIdentifier:identifier];
    }else {
        viewController = [storyboard instantiateInitialViewController];
    }
    
    return viewController;
}

@end
